// 导入Vue 3的创建应用程序的函数
import { createApp } from 'vue'
// 导入应用程序的主组件
import App from './App.vue'
// 导入Element Plus库
import ElementPlus from 'element-plus'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import VueCookies from 'vue-cookies'
// 引入Element Plus的CSS文件
import 'element-plus/dist/index.css'
// 引入vue-cropper的CSS文件
import 'vue-cropper/dist/index.css'
// 导入应用程序的路由配置
import router from '#/router'
//导入自定义样式
import '#/assets/icon/iconfont.css'
import '#/assets/base.scss'
import '#/assets/font_ij36j38mn6/iconfont.css'
import '#/assets/font_f0dnnofvz1d/iconfont.css'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'




// 创建Vue应用程序
const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
// 使用Element Plus库和路由模块
app.use(ElementPlus)
app.use(router)
app.use(VueCookies)
app.use(pinia)

app.config.warnHandler = function (msg) {
  if (!msg.includes('Invalid prop: custom validator check failed for prop "shape"')) {
    // 调用原始的警告处理器
  }
}
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 定义全局变量属性
/**import { getCurrentInstance} from "vue";
 * const { proxy } = getCurrentInstance();
 * proxy.$axios({get,params})
 */
// app.config.globalProperties.$axios = axios

// 将应用程序挂载到HTML元素上，启动应用程序
app.mount('#app')
